import java.util.Scanner;

public class Text6 {
    public static void main(String[] args) {
        Scanner sca = new Scanner(System.in);
        int n = sca.nextInt();
        System.out.println(fun(n));
    }
    //迭代实现
    public static int fun(int n){
        if(n == 1 || n== 2) {
            return 1;
        }
            int sum = 0;
            int n1 = 1;
            int n2 = 1;
            for (int i = 3; i <=n ; i++) {
                sum = n1 + n2;
                n1 = n2;
                n2 = sum;
            }
            return sum;
    }
    //递归实现
    public static int fB(int n){
        if(n == 1 || n== 2){
            return 1;
        }else{
            return fB(n-1)+fB(n-2);
        }
    }
}
